<!DOCTYPE html>
<html lang="{{ app.request.locale|split('_')[0] }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    {% block meta %}
        {% include "@SuluWebsite/Extension/seo.html.twig" with {
            "seo": extension.seo|default([]),
            "content": content|default([]),
            "localizations": localizations|default([]),
            "shadowBaseLocale": shadowBaseLocale|default(),
        } %}
    {% endblock %}

    {% block style %}{% endblock %}
</head>
<body>
    <header>
        {% block header %}
            <nav>
                <ul>
                    <li>
                        <a href="{{ sulu_content_root_path() }}">Homepage</a>
                    </li>

                    {% for item in sulu_page_navigation_root_tree('main') %}
                        <li>
                            <a href="{{ sulu_content_path(item.url) }}"
                               title="{{ item.title }}">{{ item.title }}</a>
                        </li>
                    {% endfor %}
                </ul>

                <ul>
                    {% for localization in localizations|default([]) %}
                        <li>
                            <a href="{{ localization.url }}">{{ localization.locale }}</a>
                        </li>
                    {% endfor %}
                </ul>
            </nav>

            <nav>
                <ul>
                    {% for segment in segments|default([]) %}
                        <li>
                            <a href="{{ segment.url }}">{{ segment.title }}</a>
                        </li>
                    {% endfor %}
                </ul>
            </nav>
        {% endblock %}
    </header>

    {# Todo: reimplement search form
    <form action="{{ path('sulu_search.website_search') }}" method="GET">
        <input name="q" type="text" placeholder="Search"/>
        <input type="submit" value="Go"/>
    </form>
    #}

    <section id="content" vocab="http://schema.org/" typeof="Content">
        {% block content %}{% endblock %}
    </section>

    <aside>
        {% block aside %}{% endblock %}
    </aside>

    <footer>
        {% block footer %}
            <p>Copyright {{ 'now'|date('Y') }} SULU</p>
        {% endblock %}
    </footer>

    {% block javascripts %}{% endblock %}
</body>
</html>
